<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    {include file="../application/index/view/common/link.html" /}
</head>
<body>
<!--头部-->
{include file="../application/index/view/common/header.html" /}
<div class="blog-main">
    <div class="layui-container">
        <div class="layui-row layui-col-space10">
            <div class="layui-col-md2">
                <div class="panel cate">
                    <ul>
                        <li class="title">
                            <a href="{:url('post/home.index/index')}"><h2><strong>博客人生</strong></h2></a>
                        </li>
                        {volist name="categoryList" id="v"}
                        <li class="{if $v.pid == 0 or $v.lev==1}cate-parent{/if}">
                            <a href="{:url('post/home.index/index',['category'=>$v.id])}">{$v.name}</a>
                        </li>
                        {/volist}
                    </ul>
                </div>
            </div>
            <div class="layui-col-md10">
                <div class=" panel art-content">
                    <div class="art-title">
                        <h2><strong>{$article.post_title}</strong></h2>
                        <p>
                            <span>作者：{$article.user.nickname|default=$article.user.username}</span>
                            <span>日期：{$article.update_time}</span>
                            <span>点击：{$article.post_hits}</span>
                        </p>
                    </div>
                    <div class="zhengwen">{$article.post_content|raw}</div>
                    <div class="panel collection">
                        <button class="layui-btn layui-btn-lg  layui-btn-normal layui-btn-radius collcetion {if $article.collection_status==1} colshow {/if} " type="button" data-url="{:url('post/home.index/collection',['id'=>$article.id])}" data-is_collection="0">取消收藏</button>
                        <button class="layui-btn layui-btn-lg  layui-btn-danger layui-btn-radius collcetion {if $article.collection_status==0} colshow {/if}" type="button" data-url="{:url('post/home.index/collection',['id'=>$article.id])}" data-is_collection="1">收藏</button>
                        <button class="layui-btn layui-btn-lg layui-btn-radius arcSubscribe"  type="button" data-href="{:url('post/home.index/subscribe',['id'=>$article.id])}">订阅</button>

                    </div>
                </div>
                <div class="panel art-next">
                    {if isset($nexArticle.id)}
                        <a href="{:url('post/home.index/content',['id'=>$nexArticle.id])}">下一篇：{$nexArticle.post_title}</a>
                    {/if}
                    {if isset($preArticle.id)}
                    <a href="{:url('post/home.index/content',['id'=>$preArticle.id])}">上一篇：{$preArticle.post_title}</a>
                    {/if}
                </div>
                {if $article.comment_status == 1}
                    {:hook_one('commnents_view',["topic_id"=>$article.id,'topic_type'=>1,'from_uid'=>$user.id,"to_uid"=>0])}
                {/if}
            </div>
        </div>
    </div>
</div>
<!--文章订阅-->
<div class="subscribe layui-hide">
    <form action="" class="layui-form arcsubform">
        <div class="layui-form-item" >
            <div class="" >
                <input type="checkbox" value="0" class="layui-input" name="category" title="全选" lay-skin="primary" lay-filter="subscribe">
            </div>
        </div>
        <hr>
        <div class="layui-form-item">
            {volist name='categoryList' id='v'}
            <div class="">
                <input type="checkbox" class="layui-input" name="category[]" title="{$v.name}" value="{$v.id}_{$v.name}" lay-skin="primary">
            </div>
            {/volist}
        </div>
        <div class="layui-form-item">
            <div>
                <button class="layui-btn" type="submit" lay-submit lay-filter="subscribe">确定</button>
            </div>
        </div>
    </form>
</div>

<!--底部-->
{include file="../application/index/view/common/footer.html" /}
<!--右侧固定导航区域-->
{include file="../application/index/view/common/righ_fixed.html" /}
</body>
</html>